<?php
$start = microtime(true);
echo "start";
$type = 1;

$numbers = "00000 00001 00002 00003 00004 00005 00006 00007 00008 00009 00010";

//
$star = 5;
[$pat, $min, $max] = $starConfig[$star];
$result = explode(" ", $numbers);
$starConfig = [
	2 => ["%02d", 0, 99], // 00-99
	3 => ["%03d", 0, 999], // 00-999
	4 => ["%04d", 0, 9999], // 00-9999
	5 => ["%05d", 0, 99999], // 00-99999
];
[$pat, $min, $max] = $starConfig[$star];

$numbers = [];
for ($i = $min; $i <= $max; ++$i) {
	$numbers[] = sprintf($pat, $i);
}

$result = array_diff($numbers, $result);
#var_dump($result);
$endtime = microtime(true);
$timediff = sprintf('%.04f', $endtime - $start);
echo "time==" . $timediff
;?>
